package cn.zz.veggie.application.packer;

import cn.zz.veggie.model.domain.Settle;
import cn.zz.veggie.model.domain.Shop;
import cn.zz.veggie.web.types.vo.mgmt.MgmtSettleVo;

/**
 * @author zhongq
 * @since 2024/6/7
 */
public class SettlePacker {
	public static MgmtSettleVo toMgmtSettleVo(Settle settle, Shop shop) {
		MgmtSettleVo vo = new MgmtSettleVo();
		vo.setId(settle.getId());
		vo.setShop(ShopPacker.toIdName(shop));
		vo.setOrderCount(settle.getOrderCount());
		vo.setAmount(settle.getAmount());
		vo.setStatus(settle.getStatus());
		vo.setStatTime(settle.getStatTime());
		vo.setRemark(settle.getRemark());
		vo.setCreatedAt(settle.getCreatedAt());
		vo.setUpdatedAt(settle.getUpdatedAt());
		return vo;
	}
}